package com.pojo;

import java.util.Objects;

public class Contact {
    private String name;
    private String phone;
    private String gender;
    private String address;
    private String email;
    private String group;
    private boolean star;

    public Contact() {
    }

    public Contact(String name, String phone, String gender, String address, String email, String group, boolean star) {
        this.name = name;
        this.phone = phone;
        this.gender = gender;
        this.address = address;
        this.email = email;
        this.group = group;
        this.star = star;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public boolean isStar() {
        return star;
    }

    public void setStar(boolean star) {
        this.star = star;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Contact contact = (Contact) o;
        return star == contact.star && Objects.equals(name, contact.name) && Objects.equals(phone, contact.phone) && Objects.equals(gender, contact.gender) && Objects.equals(address, contact.address) && Objects.equals(email, contact.email) && Objects.equals(group, contact.group);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, phone, gender, address, email, group, star);
    }
}
